import sqlite3


class MySqlite:
    def __init__(self):
        # self.conn = sqlite3.connect(r'../SQlite/potato.db')
        self.conn =sqlite3.connect(r'E:\gitcode\potato_program\SQlite\potato.db')
        self.cur = self.conn.cursor()

    def __del__(self):
        self.conn.close()

    def return_select_content(self, string_sql):
        return self.cur.execute(string_sql).fetchall()

    def commit_operation(self, string_sql):
        self.cur.execute(string_sql)
        self.conn.commit()
